import request from '@/utils/request'

// 创建房屋图片
export function createHouseSpace(data) {
  return request({
    url: '/system/house-space/create',
    method: 'post',
    data: data
  })
}

// 更新房屋图片
export function updateHouseSpace(data) {
  return request({
    url: '/system/house-space/update',
    method: 'put',
    data: data
  })
}

// 删除房屋图片
export function deleteHouseSpace(id) {
  return request({
    url: '/system/house-space/delete?id=' + id,
    method: 'delete'
  })
}

// 获得房屋图片
export function getHouseSpace(id) {
  return request({
    url: '/system/house-space/get?id=' + id,
    method: 'get'
  })
}

// 获得房屋图片分页
export function getHouseSpacePage(params) {
  return request({
    url: '/system/house-space/searchHouseSpace',
    method: 'get',
    params
  })
}
// 导出房屋图片 Excel
export function exportHouseSpaceExcel(params) {
  return request({
    url: '/system/house-space/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}
